<?php //var_dump($data);
//var_dump($data['list']);?>
<div id="sanpham_right">
	<div id="title_right">
		<p id="title_right_left"></p>
		<div id="title_right_center">
			<p class="chu_title">SẢN PHẨM BÁN CHẠY</p>
		</div>
		<p id="title_right_right"></p>
	</div>
	<div id="banchay">
<marquee width="560px" height="230" direction=Left  scrolldelay="0" loop="-1"  scrollamount="5" onmouseover="this.stop()" onmouseout="this.start()">
		
	<?php if(isset($data['spbc']))
	{
		foreach($data['spbc'] as $item)
		{
			if(isset($data['list']))
			{
			foreach($data['list'] as $mh)
			{
				if($item['MaMH']==$mh['MaMH']){
			?>
		<div id="sanpham">
			<p align="center">
				
					<a href="public/upload/<?php echo $mh['HinhAnh'];?>" class="MagicZoomPlus" rel="zoom-position: right; zoom-height: 300px;"><img
					src="public/upload/<?php echo $mh['HinhAnh'];?>" width="100px" /></a>
				
			</p>
			<p class="ten_sp">
				<a href="index.php?mod=detail&id=<?php echo $mh['MaMH'];?>"><?php echo $mh['TenMH'];?>
				</a>
			</p>
			<p class="gia_sp">
			<?php echo number_format($mh['Gia']);?>
				VNĐ
			</p>
			<a href="index.php?mod=dathang&id=<?php echo $mh['MaMH'];?>&tenmh=<?php echo $mh['TenMH'];?>&gia=<?php echo $mh['Gia'];?>">
			<img src="public/hinhanh/mua1.jpg" style="margin-left: 30px;margin-bottom: 10px" ></a>
			<a href="index.php?mod=detail&id=<?php echo $mh['MaMH'];?>">
			<img src="public/hinhanh/xem1.jpg" align="middle" style="margin-right: 10px;margin-bottom: 10px"></a>
		</div>
		<?php
		}}
			}
		}

	}?>
	</marquee>
	<br>
	<br>
	<p align="right"><a href="index.php?mod=sanphambanchay" ><img src="public/hinhanh/xem them.jpg"></a></p>
	</div>
	</div>
